﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using System.Reflection;

namespace Analysis
{
    public partial class frmChartReport : XtraForm
    {
        public frmChartReport()
        {
            InitializeComponent();

        }

        private void frmChartReport_Load(object sender, EventArgs e)
        {
            comboBoxEdit2.Properties.Items.AddRange(Enum.GetValues(typeof(System.Windows.Forms.DataVisualization.Charting.SeriesChartType)));
            comboBoxEdit1.Properties.Items.AddRange(Enum.GetValues(typeof(ChartControl.ChartEx.ChartTypes)));
            comboBoxEdit1.SelectedIndex = 0;
        }

        private void comboBoxEdit2_SelectedIndexChanged(object sender, EventArgs e)
        {
            foreach (System.Windows.Forms.DataVisualization.Charting.Series item in chartEx1.Series)
            {
                item.ChartType = (System.Windows.Forms.DataVisualization.Charting.SeriesChartType)comboBoxEdit2.SelectedItem;
            }
        }

        private void comboBoxEdit1_SelectedIndexChanged(object sender, EventArgs e)
        {
            chartEx1.ChartType = (ChartControl.ChartEx.ChartTypes)comboBoxEdit1.SelectedItem;
            chartEx1.InitChart();
        }
    }
}
